package main

import (
	"fmt"
	"reflect"
)

func main() {

	var x float64 = 3.1415926

	/*
	      panic: reflect: reflect.Value.SetFloat using unaddressable value
	   	value := reflect.ValueOf(x)
	   	value.SetFloat(1.88)
	*/
	value := reflect.ValueOf(&x).Elem()
	fmt.Println(value)

	value.SetFloat(6.666)
	fmt.Println(x)
}
